package com.neusoft.neuiotms.dcom.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_month_weekly", uniqueConstraints = @UniqueConstraint(columnNames = {"clientCode",
        "operationTime" }))
@org.hibernate.annotations.Table(appliesTo = "neuiot_month_weekly", comment = "月报表")
public class MonthWeekly extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 项目名称 */
    @NotBlank(message = "项目名称不能为空")
    @Length(max = 255, message = "项目名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '项目名称'")
    private String projectName;

    /** 单位名称 */
    @Length(max = 255, message = "客户名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '客户名称'")
    private String clientName;

    /** 单位编码 */
    @Length(max = 255, message = "单位编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '单位编码'")
    private String clientCode;

    /** 运维组长名称 */
    @Length(max = 255, message = "运维组长名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '运维组长名称'")
    private String operationUserName;

    /** 运维组长编码 */
    @Length(max = 255, message = "运维组长编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '运维组长编码'")
    private String operationUserCode;

    /** 驻场工程师名称 */
    @Length(max = 255, message = "驻场工程师名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '驻场工程师名称'")
    private String residentEngineerUserName;

    /** 驻场工程师编码 */
    @Length(max = 255, message = "驻场工程师编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '驻场工程师编码'")
    private String residentEngineerUserCode;

    /** 机动工程师名称 */
    @Length(max = 255, message = "机动工程师名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '机动工程师名称'")
    private String mobileEngineerUserName;

    /** 机动工程师编码 */
    @Length(max = 255, message = "机动工程师编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '机动工程师编码'")
    private String mobileEngineerUserCode;

    /** 服务月 */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '服务月'")
    private Integer serviceMonth = 0;

    /** 广域网计划外断网时长(分) */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '广域网计划外断网时长(分)'")
    private Integer unplannedWanOutageDuration;

    /** 广域网月可用性(%) */
    @Comment("double(12,2) NULL COMMENT '广域网月可用性(%)'")
    private Double wanMonthlyAvailability = 0.0D;

    /** 局域网计划外断网时长(分) */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '局域网计划外断网时长(分)'")
    private Integer unplannedLanOutageDuration;

    /** 局域网月可用性(%) */
    @Comment("double(12,2) NULL COMMENT '局域网月可用性(%)'")
    private Double lanMonthlyAvailability = 0.0D;

    /** 外联网计划外断网时长(分) */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '外联网计划外断网时长(分)'")
    private Integer unplannedExtranetOutageDuration;

    /** 外联网月可用性(%) */
    @Comment("double(12,2) NULL COMMENT '外联网月可用性(%)'")
    private Double extranetMonthlyAvailability = 0.0D;

    /** 驻场服务总时长(分) */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '驻场服务总时长(分)'")
    private Integer residentServiceTotalTime;

    /** 运维时间 */
    @NotNull
    @Comment("datetime NULL DEFAULT NULL COMMENT '维保开始时间'")
    private Date operationTime;

    /** 周报总结 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '周报总结'")
    private String weeklySummary;

    /** 本月总结 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '本月总结'")
    private String monthSummary;

    /** 用户满意度 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '用户满意度'")
    private String customerSatisfaction;

    /** 重大事件上报 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '重大事件上报'")
    private String majorIncidentReport;

    /** 下月工作计划 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '下月工作计划'")
    private String nextMonthWorkPlan;

    /** 下月工作计划 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '下月工作计划'")
    private String reasonableSuggestion;

    /** 服务工作总次数 */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '服务工作总次数'")
    private Integer serviceTotalNumber;

    /** 服务工作总耗时 */
    @Column(length = 8, nullable = true)
    @Comment("int(8) NULL DEFAULT NULL COMMENT '服务工作总耗时'")
    private Integer serviceTotalTime;

    /** 备注 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '备注'")
    private String remark;

    /**
     * 附件存储，用||分割多个文件；用@@分割fsId和文件name <br />
     * 16109709907255005.png@@报警通知.png||16109709907255001.png@@报警通知2.png
     */
    @Column(length = 2047, nullable = true)
    private String attachment;
}
